//
//  MSEnemyInfo.m
//  MagicSword
//
//  Created by Netease on 15/11/20.
//  Copyright © 2015年 Jonear. All rights reserved.
//

#import "MSEnemyInfo.h"
#import "MSWeaponManager.h"

@implementation MSEnemyInfo

+ (id)enemyWithType:(MSEnemyModel)type point:(CGPoint)point {
    MSEnemyInfo *info = [[MSEnemyInfo alloc] init];
    info.point = point;
    info.type = type;
    
    switch (type) {
        case MSEnemyModel_A:
            info.MaxHP = 30;
            info.HP = info.MaxHP;
            info.Attack = 7;
            info.mapImage = @"EnemyModel_A";
            info.name = @"剑兵";
            info.weaponInfo = [MSWeaponManager createWeaponWithModel:MSWeaponModel_1];
            info.moveDistance = 3;
            info.attackDistance = MSAttackDistanceType_A;
            info.AIType = MSAIManagerType_Easy;
            info.experience = 8;
            break;
            
        case MSEnemyModel_B:
            info.MaxHP = 40;
            info.HP = info.MaxHP;
            info.Attack = 9;
            info.mapImage = @"EnemyModel_B";
            info.name = @"斧兵";
            info.weaponInfo = [MSWeaponManager createWeaponWithModel:MSWeaponModel_4];
            info.moveDistance = 2;
            info.attackDistance = MSAttackDistanceType_A;
            info.AIType = MSAIManagerType_Easy;
            info.experience = 12;
            break;
            
        case MSEnemyModel_C:
            info.MaxHP = 44;
            info.HP = info.MaxHP;
            info.Attack = 12;
            info.mapImage = @"EnemyModel_C";
            info.name = @"枪兵";
            info.weaponInfo = [MSWeaponManager createWeaponWithModel:MSWeaponModel_7];
            info.moveDistance = 4;
            info.attackDistance = MSAttackDistanceType_A;
            info.AIType = MSAIManagerType_Simple;
            info.experience = 15;
            break;
            
        case MSEnemyModel_D:
            info.MaxHP = 55;
            info.HP = info.MaxHP;
            info.Attack = 17;
            info.mapImage = @"EnemyModel_D";
            info.name = @"法师";
            info.weaponInfo = [MSWeaponManager createWeaponWithModel:MSWeaponModel_10];
            info.moveDistance = 4;
            info.attackDistance = MSAttackDistanceType_A;
            info.AIType = MSAIManagerType_Simple;
            info.experience = 15;
            break;
            
        default:
            break;
    }
    
    return info;
}
@end
